<?php $SS = new Zend_Session_Namespace ('Language');

$lang = $SS->language;

$langDetail = "Chi tiết";
if($lang == "en"){
$langDetail = "Detail";  
}elseif($lang == "chi"){
$langDetail = "細節";
}

$langProduct = "Sản phẩm";
if($lang == "en"){
$langProduct = "Products";  
}elseif($lang == "chi"){
$langProduct = "產品";  
} 


$langProduction = "Nguồn gốc";
if($lang == "en"){
$langProduction = "Production";  
}elseif($lang == "chi"){
$langProduction = "生產";
}
?>
<div class="head-content"><?php echo $langProduct;?> <?php if(isset($this->catName)){echo " | ".$this->catName;}?></div>
<div class="news-fix product-fix">
    <?php if(count($this->data) > 0) {?>
    <?php foreach($this->data as $vl):?>
    <?php $namePro = $vl['name'];
                                          if($lang == "en"){
                                          $namePro = $vl['name_en'];  
                                          }elseif($lang == "chi"){
                                          $namePro = $vl['name_china'];
                                          } 
                                    ?>
    <div class="item">
        <div class="image">
            <a href="<?php echo "/san-pham/".$vl['id']."-".$this->cleanstring($lang == "en" ? $vl['name_en'] : $vl['name']).".html";?>" title="<?php echo $lang == "en" ? $vl['name_en'] : $vl['name'];?>"><img src="<?php echo $this->baseUrl()."/upload/".$vl['image'];?>" alt="<?php echo $lang == "en" ? $vl['name_en'] : $vl['name'];?>" width="214" height="125"/></a>
        </div>
        <div class="info">
            <p class="title"><a href="<?php echo "/san-pham/".$vl['id']."-".$this->cleanstring($lang == "en" ? $vl['name_en'] : $vl['name']).".html";?>" title="<?php echo $lang == "en" ? $vl['name_en'] : $vl['name'];?>"> <?php echo $this->Substring($namePro,  50);?></a></p>
            <p class="madein"><?php echo $langProduction;?>  : <?php echo $vl['madein'];?></p>
            <p class="madein"><?php echo number_format($vl['price']);?> VNĐ/kg</p>
            <p class="bt-news-detail"><a href="<?php echo "/san-pham/".$vl['id']."-".$this->cleanstring($lang == "en" ? $vl['name_en'] : $vl['name']).".html";?>" title="<?php echo $lang == "en" ? $vl['name_en'] : $vl['name'];?>"> >> <?php echo $langDetail;?></a></p>
        </div>
    </div>
    <?php endforeach;?>
    <?php }else{ ?>
    <div class="no-product">
    Không có sản phẩm nào
    </div>
    <?php } ?>    
</div>
<div class="pagination pagination-centered">
<?php echo $this->paginationControl($this->data, 'Sliding', 'pagination.phtml'); ?>
</div>